﻿Public Class frmSelecaoItem

#Region "Variáveis"


#End Region

#Region "Funções"

    Private Sub CarregarComboBoxItens()

        Dim objItens As New Negocios.Item

        cbbItens.DataSource = objItens.RetornarListaItens()

    End Sub

    Public Sub ConfigurarTextos()

        lblSelecionar.Text = Resources.RetornarTextos("SelecionarItem")
        tbpEstatisticas.Text = Resources.RetornarTextos("Estatisticas")
        Me.Text = Resources.RetornarTextos("SelecaoItem")
        lblHealth.Text = Resources.RetornarTextos("StatusVida")
        lblHealthRegen.Text = Resources.RetornarTextos("StatusRegeneracaoVida")
        lblResourceType.Text = Resources.RetornarTextos("StatusTipoRecurso")
        lblResource.Text = Resources.RetornarTextos("StatusRecurso")
        lblResourceRegen.Text = Resources.RetornarTextos("StatusRegeneracaoRecurso")
        lblAttackDamage.Text = Resources.RetornarTextos("StatusAttackDamage")
        lblAttackDamageLevel.Text = Resources.RetornarTextos("StatusAttackDamageLevel")

        lblAbilityPower.Text = Resources.RetornarTextos("StatusAbilityPower")
        lblAbilityPowerLevel.Text = Resources.RetornarTextos("StatusAbilityPowerLevel")
        lblAttackSpeed.Text = Resources.RetornarTextos("StatusAttackSpeed")
        lblArmor.Text = Resources.RetornarTextos("StatusArmor")
        lblMagicResist.Text = Resources.RetornarTextos("StatusMagicResist")
        lblMovementSpeed.Text = Resources.RetornarTextos("StatusMovementSpeed")
        lblMovementSpeedPerc.Text = Resources.RetornarTextos("StatusMovementSpeedPerc")

        lblLifeSteal.Text = Resources.RetornarTextos("StatusLifeSteal")
        lblCritical.Text = Resources.RetornarTextos("StatusCritical")
        lblSpeelVamp.Text = Resources.RetornarTextos("StatusSpeelVamp")
        lblCoolDownReduction.Text = Resources.RetornarTextos("StatusCoolDownReduction")
        lblArmorPen.Text = Resources.RetornarTextos("StatusArmorPen")
        lblArmorPenPerc.Text = Resources.RetornarTextos("StatusArmorPenPerc")
        lblMagicPen.Text = Resources.RetornarTextos("StatusMagicPen")
        lblMagicPenPerc.Text = Resources.RetornarTextos("StatusMagicPenPerc")
        lblTenacity.Text = Resources.RetornarTextos("StatusTenacity")
        lblGoldPerSec.Text = Resources.RetornarTextos("StatusGoldPerLevel")

    End Sub

    Private Sub CarregarItem(ByVal objItem As Objetos.Item)

        Dim strNomeChampion As String = Negocios.Champions.TrataNomeChampion(objItem.Nome)

        lblNome.Text = objItem.Nome
        lblCusto.Text = objItem.Custo
        'picItem.ImageLocation = Resources.RetornarImagemChampion(strNomeChampion)

        txtHealth.Text = objItem.Health
        txtHealthRegen.Text = objItem.Health_regen
        txtResourceType.Text = objItem.Resource_type
        txtResource.Text = objItem.Resource
        txtResourceRegen.Text = objItem.Resource_regen
        txtAttackDamage.Text = objItem.Attack_damage
        txtAttackDamageLevel.Text = objItem.Attack_damage_level

        txtAbilityPower.Text = objItem.Ability_power
        txtAbilityPowerLevel.Text = objItem.Ability_power_level
        txtAttackSpeed.Text = objItem.Attack_speed
        txtArmor.Text = objItem.Armor
        txtMagicResist.Text = objItem.Magic_resist
        txtMovementSpeed.Text = objItem.Movement_speed
        txtMovementSpeedPerc.Text = objItem.Movement_speed_perc

        txtLifeSteeal.Text = objItem.Life_steal
        txtCritical.Text = objItem.Critical
        txtSpeelVamp.Text = objItem.Spell_vamp
        txtCDR.Text = objItem.Cooldown_reduction
        txtArmorPen.Text = objItem.Armor_pen
        txtArmorPenPerc.Text = objItem.Armor_pen_perc
        txtMagicPen.Text = objItem.Magic_pen
        txtMagicPenPerc.Text = objItem.Magic_pen_perc
        txtTenacity.Text = objItem.Tenacity
        txtGoldPerSec.Text = objItem.Gold_per_sec

    End Sub

#End Region

#Region "Eventos"

    Private Sub frmSelecaoItem_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        ConfigurarTextos()
        CarregarComboBoxItens()
    End Sub

    Private Sub cbbItens_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbbItens.SelectedIndexChanged

        Dim objItem As Objetos.Item = CType(cbbItens.SelectedValue, Objetos.Item)

        CarregarItem(objItem)

    End Sub

#End Region



End Class